home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / C⁄C++ / DialogControls / MyMenus.c < prev    next >
C/C++ Source or Header  |  1995-05-08  |  885b  |  38 lines

  1. #include "MyMenus.h"
  2. #include "Functions.h"
  3.  
  4. // I include this because of an archaic way I used to do things, and it needs
  5. // to have a file named this with appropriate functions in it.  I've got too
  6. // many programs dependent on this scheme that I don't want to change it yet.
  7. // This also allows for having all menu related functions in one place.
  8.  
  9. #define        mApple            128
  10. #define        mFile            129
  11. #define        mEdit            130
  12.  
  13. #define        miAbout            1
  14.  
  15. #define        miOpen            1
  16. #define        miClose            2
  17. #define        miQuit            7
  18.  
  19.  
  20. void    TwiddleMenus( void )
  21. {
  22.     // Here I usually check the state of many of my globals, and see which menus should be enabled.
  23.     // There is no need for that here, so it's hard-coded.
  24.     
  25.     MenuEnable( mFile, 0, true );
  26.     MenuEnable( mApple, 1, true );
  27.  
  28.     DrawMenuBar();
  29. }
  30.  
  31. void    MovableModalMenus( void )
  32. {
  33.     MenuEnable( mFile, 0, false );
  34.     MenuEnable( mApple, 1, false );
  35.     
  36.     DrawMenuBar();
  37. }
  38.